#!/bin/bash
set -e

if [[ $# != 3 ]]; 
then
    echo "Usage: release  vender productname 1.0.0"
    exit -1
fi

if [ -e dist ]
then
    rm -rf dist
fi


export VENDOR=$1
export PRODUCT=$2
export VERSION=$3

python setup.py py2exe
cd NSIS
makensis mkotopl.nsi
cd ..
echo "build success!"
